<?php /* Smarty version 2.6.26, created on 2013-12-18 10:38:57
         compiled from admin/edituser.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'geturl', 'admin/edituser.html', 5, false),array('modifier', 'escape', 'admin/edituser.html', 17, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'admin/header.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php if ($this->_tpl_vars['fp']->user->getId() == 1 && $this->_tpl_vars['identity']->id != 1): ?>
<p>Вы не можете изменять данные глобального администратора.</p>
<?php else: ?>
<form method="post" action="<?php echo smarty_function_geturl(array('route' => 'edituser','id' => $this->_tpl_vars['fp']->user->getId()), $this);?>
" id="registration-form">

    <fieldset>
        <legend>Профиль</legend>
        <div class="error"<?php if (! $this->_tpl_vars['fp']->hasError()): ?> style="display: none"<?php endif; ?>>
            Одно или несколько полей заполнены неверно. Проверьте, пожалуйста, 
            поля с ошибками и отправьте форму ещё раз.
        </div>

        <div class="row" id="form_username_container">
            <label for="form_username">Логин:</label>
            <input type="text" id="form_username"
                   name="login" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['fp']->login)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
            <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'lib/error.tpl', 'smarty_include_vars' => array('error' => $this->_tpl_vars['fp']->getError('login'))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        </div>
        
        <div class="row" id="form_password_container">
            <label for="form_password">Пароль:</label>
            <input type="password" id="form_password"
                   name="password" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['fp']->password)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
            <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'lib/error.tpl', 'smarty_include_vars' => array('error' => $this->_tpl_vars['fp']->getError('password'))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        </div>
        
        <div class="row" id="form_password_again_container">
            <label for="form_email">Подтвердите пароль:</label>
            <input type="password" id="form_password_again"
                   name="password_again" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['fp']->password_again)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
            <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'lib/error.tpl', 'smarty_include_vars' => array('error' => $this->_tpl_vars['fp']->getError('password_again'))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        </div>

        <div class="row" id="form_first_name_container">
            <label for="form_company">Предприятие:</label>
            <input type="text" id="form_company"
                   name="company" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['fp']->company)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
            <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'lib/error.tpl', 'smarty_include_vars' => array('error' => $this->_tpl_vars['fp']->getError('company'))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        </div>

        <div class="row" id="form_adress_container">
            <label for="form_adress">Юридический адрес:</label>
            <input type="text" id="form_adress"
                   name="adress" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['fp']->adress)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
            <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'lib/error.tpl', 'smarty_include_vars' => array('error' => $this->_tpl_vars['fp']->getError('adress'))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        </div>
        
        <div class="row" id="form_real_adress_container">
            <label for="form_real_adress">Фактический адрес:</label>
            <input type="text" id="form_adress"
                   name="real_adress" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['fp']->real_adress)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
            <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'lib/error.tpl', 'smarty_include_vars' => array('error' => $this->_tpl_vars['fp']->getError('real_adress'))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        </div>
        
        <div class="row" id="form_company_phone_container">
            <label for="form_company_phone">Телефон:</label>
            <input type="text" id="form_company_form"
                   name="company_phone" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['fp']->company_phone)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
            <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'lib/error.tpl', 'smarty_include_vars' => array('error' => $this->_tpl_vars['fp']->getError('company_phone'))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        </div>
        
        <div class="row" id="form_code_container">
            <label for="form_code">Код ОКПОУ:</label>
            <input type="text" id="form_code"
                   name="code" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['fp']->code)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
            <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'lib/error.tpl', 'smarty_include_vars' => array('error' => $this->_tpl_vars['fp']->getError('code'))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        </div>
        
        <div class="row" id="form_password_again_container">
            <label for="form_email">Выберите категории:</label>
            <?php $_from = $this->_tpl_vars['cats']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['cat']):
?>
                <?php $this->assign('checked', 0); ?>
                <?php $_from = $this->_tpl_vars['fp']->user->categories; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['c']):
?>
                    <?php if ($this->_tpl_vars['c']->idCat == $this->_tpl_vars['cat']->getId()): ?>
                        <?php $this->assign('checked', 1); ?>
                    <?php endif; ?>
                <?php endforeach; endif; unset($_from); ?>
                <input type='checkbox' name='cats[]' value='<?php echo $this->_tpl_vars['cat']->getId(); ?>
' <?php if ($this->_tpl_vars['checked'] == 1): ?> checked='checked'<?php endif; ?> /> <?php echo ((is_array($_tmp=$this->_tpl_vars['cat']->name)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>

            <?php endforeach; endif; unset($_from); ?>
            <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'lib/error.tpl', 'smarty_include_vars' => array('error' => $this->_tpl_vars['fp']->getError('category'))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        </div>
        
        <div class="row" id="form_email_container">
            <label for="form_email">E-mail:</label>
            <input type="text" id="form_email"
                   name="email" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['fp']->email)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
            <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'lib/error.tpl', 'smarty_include_vars' => array('error' => $this->_tpl_vars['fp']->getError('email'))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        </div>
        
        <div class="row" id="form_manager_container">
            <label for="form_manager">Контактное лицо:</label>
            <input type="text" id="form_manager"
                   name="manager" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['fp']->manager)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
            <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'lib/error.tpl', 'smarty_include_vars' => array('error' => $this->_tpl_vars['fp']->getError('manager'))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        </div>
        
        <div class="row" id="form_post_container">
            <label for="form_post">Должность:</label>
            <input type="text" id="form_post"
                   name="post" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['fp']->post)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
            <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'lib/error.tpl', 'smarty_include_vars' => array('error' => $this->_tpl_vars['fp']->getError('post'))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        </div>
        
        <div class="row" id="form_phone_container">
            <label for="form_phone">Телефон:</label>
            <input type="text" id="form_form"
                   name="phone" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['fp']->phone)) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" />
            <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'lib/error.tpl', 'smarty_include_vars' => array('error' => $this->_tpl_vars['fp']->getError('phone'))));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
        </div>
        
        <div class="row" id="form_phone_container">
            <label for="form_isApproved">Одобрен:</label>
            <input type="checkbox" id="form_isApproved"
                   name="isApproved"<?php if ($this->_tpl_vars['fp']->isApproved): ?> checked="checked"<?php endif; ?> />
        </div>

        <div class="submit">
            <input type="submit" value="Сохранить" />
        </div>
    </fieldset>
</form>
<?php endif; ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'admin/footer.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>